Skip to content

Editor polish: paint SFX, duplicate keeps slots, review-skill convention#433

Merged
wass08 merged 3 commits into
mainfrom
chore/editor-polish
Jun 19, 2026
Merged

Editor polish: paint SFX, duplicate keeps slots, review-skill convention#433
wass08 merged 3 commits into
mainfrom
chore/editor-polish

Conversation

@wass08

@wass08 wass08 commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Three small editor-side polish items (split into one commit each):

  1. feat(sfx) — paint-apply sound. Registers a paintApply SFX (rate/volume jitter + 60 ms min interval so rapid multi-face painting doesn't machine-gun), wires the sfx:paint-apply bus event, and emits it from the material-paint click chokepoint in the selection manager (fires on apply, not hover/preview). Adds apps/editor/public/audios/sfx/paint_apply.mp3.
  2. fix(item) — duplicated items keep their painted slot materials. Duplicating an item drops into the catalog placement flow, which rebuilt the draft from asset + transform and never carried node.slots, so the copy lost every painted slot. Threads slots through the draft path: useDraftNode.create seeds it, commit() forwards it to the final node, the placement coordinator passes it to its lazy wall/ceiling draft creates, and the item move tool supplies node.slots for both the floor and wall/ceiling duplicate paths. (Other kinds clone via structuredClone + parse + createNode, which already preserved slots — this was item-specific.)
  3. docs(review-skill) — slots + world-scale-UV convention. Adds a Section B rule to review-architecture: a new node kind / geometry change exposing paintable parts must carry overrides in a schema slots record resolved via def.capabilities.paint (and thread it through clone/duplicate/preset paths), and texturable def.geometry must emit UVs in metres (1 unit = 1 m) so catalog finishes tile. Surfaced in the skill description.

How to test

  1. SFX: enter paint mode, paint a surface → the paint cue plays; rapid painting stays subtle (gap + jitter).
  2. Duplicate slots: paint an item's slot a catalog material → duplicate the item → the copy keeps the material (test a floor item and a wall-hosted item).
  3. Review skill: skim Section B of .agents/skills/review-architecture/SKILL.md and the new convention bullets.

Screenshots / screen recording

N/A — audio + behavior + docs.

Checklist

  • I've tested this locally with bun dev — static checks only (typecheck + biome clean); runtime SFX/duplicate behavior validated locally by the author
  • My code follows the existing code style (biome check clean)
  • I've updated relevant documentation (review-architecture skill)
  • This PR targets the main branch

wass08 and others added 3 commits June 19, 2026 10:50
Registers a paintApply SFX (with rate/volume jitter + a 60ms gap so rapid
multi-face painting doesn't machine-gun), wires the sfx:paint-apply bus
event, and emits it from the material-paint click chokepoint in the
selection manager (fires on apply, not hover/preview). Adds the audio
asset to the editor app's public resources.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Duplicating an item drops to the catalog placement flow, which rebuilds the
draft from the asset + transform and never carried node.slots — so the copy
lost every painted slot override. Thread slots through the draft create path:
useDraftNode.create seeds it onto the draft and commit() forwards it to the
final node, the placement coordinator passes it to its lazy wall/ceiling
draft creates, and the item move tool supplies node.slots for both the floor
(direct create) and wall/ceiling (coordinator) duplicate paths.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… nodes

Adds a Section B rule to the review-architecture skill: a new node kind or
geometry change that exposes paintable parts must carry overrides in a
schema `slots` record resolved via def.capabilities.paint (and thread it
through clone/duplicate/preset paths), and texturable def.geometry must
emit UVs in metres (1 unit = 1 m) so catalog finishes tile. Surfaced in the
skill description too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mintlify

mintlify Bot commented Jun 19, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
pascal 🔴 Failed Jun 19, 2026, 5:11 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@wass08 wass08 merged commit f235261 into main Jun 19, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant